package com.vhall.component.controller.export.facade;

import com.alibaba.fastjson.JSONObject;
import com.vhall.component.entity.export.vo.AdmReExportReqVO;
import com.vhall.component.entity.export.vo.ExportAdmCreateReqVO;
import com.vhall.component.entity.export.vo.ExportAdmListReqVO;
import com.vhall.component.entity.export.vo.ExportAdmRspVO;
import com.vhall.component.entity.page.vo.PageVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

/**
 *
 * 数据导出
 * @author yuanzh
 * @date 2021/11/19
 */
@FeignClient(value = "ExportAdmFacade", path = "/v4/export/admin")
public interface ExportAdmFacade {

    /**
     * 导出列表
     *
     * @param reqVO 参数
     * @return 返回值
     */
    @GetMapping("/list")
    PageVO<ExportAdmRspVO> list(@Validated ExportAdmListReqVO reqVO);

    /**
     * 创建下载任务
     *
     * @param reqVO 请求参数
     * @return 成功则返回空json
     */
    @PostMapping(value = "/create")
    JSONObject create(@Validated ExportAdmCreateReqVO reqVO);

    /**
     * 重新导出
     *
     * @param reqVO 请求参数
     * @return 成功则返回空json
     */
    @GetMapping(value = "/re-export")
    JSONObject reExport(@Validated AdmReExportReqVO reqVO);

}
